//
//  ViewController.swift
//  CocoaPodsCollect
//
//  Created by LiynXu on 2016/9/26.
//  Copyright © 2016年 LiynXu. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
//        let url1 = "http://httpbin.org"
//        let url3 = "https://httpbin.org"
        let url2 = "http://iappfree.candou.com:8080/free/applications/limited?currency=rmb&page=1&limit=5"
        let ur4 = "http://mobile.ximalaya.com/mobile/v1/album?albumId=4539015"
        
        let url5 = "http://route.showapi.com/582-2?&showapi_appid=15325&showapi_sign=3CB6AE06EC7ECF048EA4D18CF5B7B684&page=1&typeId=6&count=5"
        let netrequest = NetRequest.shareNetRequest
        
        netrequest.delegate = self
        netrequest.GetRequest(url5, parameters: nil)
        
        
        
    }

   


}
extension ViewController:NetRequestDelagate{
    func finish(responseObject: AnyObject?) {
        let json = JsonModel().initWithDict(responseObject as! Dictionary)
        
        print(json)
    }
    func failred(error:NSError) {
        print(error)
    }
}

